package com.kaluli.system.repository;


public class EncodingTool {

	 public static String encodeStr(String str){
		 if(!"".equals(str)&& str!=null){
		 try {
			 if(str.equals(new String(str.getBytes("ISO-8859-1"),"ISO-8859-1"))){
			            return new String(str.getBytes("ISO-8859-1"), "UTF-8");  
			    }else{
			    	return str;
			    }
			} catch (Exception e) {
				// TODO: handle exception
			}
		 }
		 return null;
	 	}
	
}
